﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Feedback.aspx.cs" Inherits="WL_Store.Web.subpage.Feedback" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="../assets/css/bootstrap.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="../css/style.css"/>       
        <link href="../assets/css/codemirror.css" rel="stylesheet"/>
        <link rel="stylesheet" href="../assets/css/ace.min.css" />
        <link rel="stylesheet" href="../font/css/font-awesome.min.css" />
        <!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->
		<script src="../js/jquery-1.9.1.min.js"></script>
		<script src="../js/displayPart.js" type="text/javascript"></script>
        <script src="../assets/js/bootstrap.min.js"></script>
		<script src="../assets/js/typeahead-bs2.min.js"></script>           	
		<script src="../assets/js/jquery.dataTables.min.js"></script>
		<script src="../assets/js/jquery.dataTables.bootstrap.js"></script>
        <script src="../assets/layer/layer.js" type="text/javascript" ></script>          
        <script src="../assets/laydate/laydate.js" type="text/javascript"></script>
    <script src="../My97DatePicker/WdatePicker.js"></script>
		  
<title>意见反馈</title>
     <style>
        #tb_feed  th {
            text-align: center;
            background-color: #a7a7a7;
             /*border:1px solid #000000;*/
        }

        .add_name span {
            color: red;
        }
        #tb_feed td{
        padding:4px;
         /*border:1px solid #000000;*/
         text-align:center;
        }
        #tb_feed tr {
        height:40px;
        /*border:1px solid #000000;*/
        background-color:#ededed;
        }
      
        #tb_feed {
        border-collapse:collapse;
        margin:0 auto;
        
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
       <div class="margin clearfix">
 <div class="Feedback_style">
   <div class="search_style">
     
      <ul class="search_content clearfix">
       <li>
                                <label class="l_f">姓名:</label>
                                
                                <asp:TextBox ID="txt_search_name" runat="server" class="text_add" style="width: 200px" ></asp:TextBox>

                            </li>
                            <li>
                                <label class="l_f">反馈时间:</label>
                               
                                <%--<asp:TextBox ID="txt_StartEntrytime" runat="server" class="inline laydate-icon" style="margin-left: 10px;" autocomplete="off" ></asp:TextBox>--%>
                                <input id="txt_StartFeedtime" runat="server" class="inline laydate-icon" onclick="WdatePicker({ isShowClear: true, readOnly: true })" />
                                <label>至</label>
                                <%--<asp:TextBox ID="txt_EndEntrytime" runat="server" class="inline laydate-icon" style="margin-left: 10px;" autocomplete="off" ></asp:TextBox>--%>
                                 <input id="txt_EndFeedtime" runat="server" class="inline laydate-icon" onclick="WdatePicker({ isShowClear: true, readOnly: true })" />
                            </li>
                            <li>
                                <label class="l_f">反馈类型:</label>
                                <asp:DropDownList ID="ddl_type" runat="server" class="text_add"  style="margin-left: 10px;" ></asp:DropDownList>

                            </li>
                            

                            <li style="width: 90px;">
                                <%--<i class="fa fa-search" style="margin-left: 20px;margin-top: 7px;position: absolute;color: wheat;font-size: 19px;"></i>--%>
                                <asp:Button ID="btn_search" runat="server" Text="检索" class="btn_search"  CausesValidation="false" OnClick="btn_search_Click" />
                            </li>
      </ul>
    </div>
  <div class="border clearfix">
       <span class="l_f">
        <a href="javascript:ovid()" id="feedback_add" class="btn btn-warning"><i class="fa fa-plus"></i>添加管理员</a>
        <a href="javascript:ovid()" class="btn btn-danger"><i class="fa fa-trash"></i>&nbsp;批量删除</a>
        <a href="javascript:ovid()" class="btn btn-sm btn-primary"><i class="fa fa-check"></i>&nbsp;已浏览</a>
        <a href="javascript:ovid()" class="btn btn-yellow"><i class="fa fa-times"></i>&nbsp;未浏览</a>
        <a href="javascript:ovid()" class="btn btn-success"><i class="fa fa-feed"></i>&nbsp;建议</a>
        <a href="javascript:ovid()" class="btn btn-success"><i class="fa fa-feed"></i>&nbsp;投诉</a>
       </span>
       <span class="r_f">共：<b>2334</b>条</span>
     </div>
    <div class="feedback">
   
        <table id="tb_feed">
            <tr>
                 <th>序号</th>
                 <th>员工编号</th>
                 <th>员工姓名</th>
                 <th style="width:700px">反馈内容</th>
                 <th>反馈时间</th>
                 <th>类型</th>
                 <th>状态</th>
                 <th>是否删除</th>
                <th>编辑</th>
            </tr>
           <asp:Repeater runat="server" ID="rpt_feedbacks">
               <ItemTemplate>
                   <tr>
                        <td><%# Eval("Id") %></td>
                        <td><%# Eval("number") %></td>
                        <td><%# Eval("name") %></td>
                        <td><%# Eval("feedCount") %></td>
                        <td><%# Eval("feedTime") %></td>
                        <td><%# Eval("types") %></td>
                        <td><%# Eval("stateString") %></td>
                        <td><%# Eval("isDeleteString") %></td>
                       <td>
                           <a href='Feedback_edit.aspx?Id=<%# Eval("Id") %>' class="btn btn-warning">编辑</a>
                           <asp:LinkButton ID="lbt_del" class="btn btn-warning" runat="server" CommandName="del" CommandArgument='<%# Eval("Id") %>' OnCommand="lbt_del_Command" OnClientClick="return confirm('你确定要删除吗？')" CausesValidation="false" Visible=' <%# Convert.ToBoolean(Eval("isDelete"))?false:true %>'>删除</asp:LinkButton>
                                
                       </td>
                   </tr>
               </ItemTemplate>
           </asp:Repeater>
        </table>
    </div>
 </div>
</div>
<!--留言详细-->
<div id="Guestbook" style="display:none">
 <div class="content_style">
  <div class="form-group"><label class="col-sm-2 control-label no-padding-right" for="form-field-1">留言用户 </label>
       <div class="col-sm-9">胡海天堂</div>
	</div>
     <div class="form-group"><label class="col-sm-2 control-label no-padding-right" for="form-field-1">联系电话 </label>
       <div class="col-sm-9">1234567787</div>
	</div>
     <div class="form-group"><label class="col-sm-2 control-label no-padding-right" for="form-field-1">联系邮箱 </label>
       <div class="col-sm-9">344665@qq.com</div>
	</div>
   <div class="form-group"><label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 留言内容 </label>
       <div class="col-sm-9">三年同窗，一起沐浴了一片金色的阳光，一起度过了一千个日夜，我们共同谱写了多少友谊的篇章?愿逝去的那些闪亮的日子，都化作美好的记忆，永远留在心房。认识您，不论是生命中的一段插曲，还是永久的知已，我都会珍惜，当我疲倦或老去，不再拥有青春的时候，这段旋律会滋润我生命的每一刻。在此我只想说：有您真好!无论你身在何方，我的祝福永远在您身边!</div>
	</div>
   
 </div>
</div>
        <%-- 添加信息 --%>

        <div class="add_menber" id="add_feed_style" style="display:none">

    <ul class=" page-content">
        <li>
            <label class="label_name">员工编号：</label>
            <span class="add_name">
                <asp:TextBox ID="txt_add_number" runat="server" class="text_add" placeholder="员工编号"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="请输入员工编号" ControlToValidate="txt_add_number"></asp:RequiredFieldValidator>
            </span>
            <div class="prompt r_f"></div>
        </li>
       
        <li>
            <label class="label_name">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：</label><span class="add_name">
                <asp:TextBox ID="txt_add_name" runat="server" class="text_add" placeholder="姓名"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="请输入姓名" ControlToValidate="txt_add_name"></asp:RequiredFieldValidator>
            </span>
            <div class="prompt r_f"></div>
        </li>
      
        <li class="adderss" style="height:120px">
            <label class="label_name">反馈内容：</label><span class="add_name">
                <asp:TextBox ID="txt_add_count" runat="server" class="text_add" placeholder="反馈内容" TextMode="MultiLine" style="width:552px;height:120px"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="请输入反馈内容" ControlToValidate="txt_add_count"></asp:RequiredFieldValidator>
            </span>
            <div class="prompt r_f"></div>
        </li>
        
        
        <li>
            <label class="label_name">反馈时间：</label><span class="add_name">
               <input id="txt_add_time" runat="server" class="inline laydate-icon" onclick="WdatePicker({ isShowClear: true, readOnly: true })" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="请输入反馈时间" ControlToValidate="txt_add_time"></asp:RequiredFieldValidator>
           
            </span>
            <div class="prompt r_f"></div>
        </li>

        <li>
            <label class="label_name">类&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型：</label><span class="add_name">
                 <asp:DropDownList ID="ddl_add_type" runat="server" class="text_add"  style="margin-left: 10px;" ></asp:DropDownList>

                
            </span>
            <div class="prompt r_f"></div>
        </li>
        <li class="adderss" style="text-align: center">
            <asp:Button ID="btn_add" runat="server" Text="添加" class="btn btn-primary radius"  OnClick="btn_add_Click"  />
            <asp:Button ID="btn_clear" runat="server" Text="重置" class="btn btn-primary radius" OnClick="btn_clear_Click"   />
            <div class="prompt r_f"></div>
        </li>
    </ul>
   
 </div>

    </form>
</body>
</html>
<script type="text/javascript">
/*留言查看*/
function Guestbook_iew(id){
	var index = layer.open({
        type: 1,
        title: '反馈信息',
		maxmin: true, 
		shadeClose:false,
        area : ['600px' , ''],
        content:$('#Guestbook'),
		btn:['确定','取消'],
	})	
};
/*留言-删除*/
function member_del(obj,id){
	layer.confirm('确认要删除吗？',function(index){
		$(obj).parents("tr").remove();
		layer.msg('已删除!',{icon:1,time:1000});
	});
}
    jQuery(function ($) {
        var oTable1 = $('#sample-table').dataTable({
            "aaSorting": [[1, "desc"]],//默认第几个排序
            "bStateSave": true,//状态保存
            "aoColumnDefs": [
                //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                { "orderable": false, "aTargets": [0, 2, 3, 4, 5, 6, 7, 8, 9] }// 制定列不参与排序
            ]
        });
        $('table th input:checkbox').on('click', function () {
            var that = this;
            $(this).closest('table').find('tr > td:first-child input:checkbox')
                .each(function () {
                    this.checked = that.checked;
                    $(this).closest('tr').toggleClass('selected');
                });

        });
        $('[data-rel="tooltip"]').tooltip({ placement: tooltip_placement });
        function tooltip_placement(context, source) {
            var $source = $(source);
            var $parent = $source.closest('table')
            var off1 = $parent.offset();
            var w1 = $parent.width();

            var off2 = $source.offset();
            var w2 = $source.width();

            if (parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2)) return 'right';
            return 'left';
        }
    });
    $(function () {
        /*反馈信息-添加*/
        $('#feedback_add').on('click', function () {
            layer.open({
                type: 1,
                title: '添加反馈信息',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area: ['800px', ''],
                content: $('#add_feed_style'),

                yes: function (index, layero) {
                    var num = 0;
                    var str = "";
                    $(".add_menber input[type$='text']").each(function (n) {
                        if ($(this).val() == "") {

                            layer.alert(str += "" + $(this).attr("name") + "不能为空！\r\n", {
                                title: '提示框',
                                icon: 0,
                            });
                            num++;
                            return false;
                        }
                    });
                    if (num > 0) { return false; }
                    else {
                        layer.alert('添加成功！', {
                            title: '提示框',
                            icon: 1,
                        });
                        layer.close(index);
                    }
                }
            });
        });


    });

</script>